package j.framework.core;

/**
 * 请求
 * Created by junhai on 2015/2/25.
 */
public class WebRequestMetadata implements java.io.Serializable {
    private String webRequestId;
    private String name;

    private String functionId;
    private boolean checkFunctionPrivilege;

    private String actionId;
    private boolean checkActionPrivilege;

    private String requestType;
    private String responseType;

    private String forwardUrl;

    private String beanClassName;
    private String beanClassMethodName;

    private boolean logSupported;

    private String dataSourceKey;
    private String jdbcTemplateType;
    private Integer transactionLevel;

    public String getWebRequestId() {
        return webRequestId;
    }
    public void setWebRequestId(String webRequestId) {
        this.webRequestId = webRequestId;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public String getFunctionId() {
        return functionId;
    }
    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }

    public boolean isCheckFunctionPrivilege() {
        return checkFunctionPrivilege;
    }
    public void setCheckFunctionPrivilege(boolean checkFunctionPrivilege) {
        this.checkFunctionPrivilege = checkFunctionPrivilege;
    }

    public String getActionId() {
        return actionId;
    }
    public void setActionId(String actionId) {
        this.actionId = actionId;
    }

    public boolean isCheckActionPrivilege() {
        return checkActionPrivilege;
    }
    public void setCheckActionPrivilege(boolean checkActionPrivilege) {
        this.checkActionPrivilege = checkActionPrivilege;
    }

    public String getRequestType() {
        return requestType;
    }
    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }

    public String getResponseType() {
        return responseType;
    }
    public void setResponseType(String responseType) {
        this.responseType = responseType;
    }

    public String getForwardUrl() {
        return forwardUrl;
    }
    public void setForwardUrl(String forwardUrl) {
        this.forwardUrl = forwardUrl;
    }

    public String getBeanClassName() {
        return beanClassName;
    }
    public void setBeanClassName(String beanClassName) {
        this.beanClassName = beanClassName;
    }

    public String getBeanClassMethodName() {
        return beanClassMethodName;
    }
    public void setBeanClassMethodName(String beanClassMethodName) {
        this.beanClassMethodName = beanClassMethodName;
    }

    public boolean isLogSupported() {
        return logSupported;
    }
    public void setLogSupported(boolean logSupported) {
        this.logSupported = logSupported;
    }

    public String getDataSourceKey() {
        return dataSourceKey;
    }
    public void setDataSourceKey(String dataSourceKey) {
        this.dataSourceKey = dataSourceKey;
    }

    public String getJdbcTemplateType() {
        return jdbcTemplateType;
    }
    public void setJdbcTemplateType(String jdbcTemplateType) {
        this.jdbcTemplateType = jdbcTemplateType;
    }

    public Integer getTransactionLevel() {
        return transactionLevel;
    }
    public void setTransactionLevel(Integer transactionLevel) {
        this.transactionLevel = transactionLevel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WebRequestMetadata that = (WebRequestMetadata) o;

        if (webRequestId != null ? !webRequestId.equals(that.webRequestId) : that.webRequestId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return webRequestId != null ? webRequestId.hashCode() : 0;
    }
}
